How to attach external execution result files in RQM result log?
sanam chugh (1●2●2)
| asked Jul 12 '12, 2:47 a.m.
retagged Jul 13 '12, 4:56 a.m. by Arne Bister (2.6k●1●28●32)
Hi,
I am able to execute my Test Cases successfully using CLA and want the result files that my framework is generating to be attached in RQM results.
I have read the article https://jazz.net/library/article/809/#AttachFiles but I am not clear how to access the Java Properties file using the qm_AttchmentsFile variavle and update it .
Please provide suggestions.
Thanks,
Sanam
|
6 answers
The exact answer will depend on whether your Command Line testscript is invoking an executable, a Windows .bat script or a Unix/Linux shell script. Assuming you are invoking a Windows .bat script you would need to add something like the following to your .bat script.
echo myReport1=C:/tmp/report1.html >> "%qm_AttachmentsFile%" echo myReport2=C:/tmp/report2.html >> "%qm_AttachmentsFile%" ... echo myReportN=C:/tmp/reportN.html >> "%qm_AttachmentsFile%" Note that I'm using forward slashes in the path pointing to the report file even on Windows platform. Since that value is going into a java properties file we either need to use forward slashes or escape any usage of backslashes. Also note the quotes around the evaluation of qm_AttachementsFile in case the path has any spaces in it (which it often does for temporary files). If you are not invoking a .bat script, and still need some help, please let me know. Comments Thanks Tom for chiming in
sanam chugh
commented Jul 17 '12, 12:40 a.m.
Thanks Tom for such a detailed response. I am using Windows bat script. I followed the steps you mentioned. After execution, the RQM result has a "QMAdapter44108.err" file attached. This error file contains the msg "The system cannot find the path specified." I am not sure what I am doing wrong. Please find by batch script E:\RQM\MyScript.exe echo myReport1=C:\Logs\InfoLog.html >> "%qm_AttachmentsFile%" EXIT 0
sanam chugh
commented Jul 17 '12, 12:56 a.m.
One question... Support for attaching external file is present in RQM 4.0... Is is also supported in RQM 3.0??? As per work item https://jazz.net/jazz02/web/projects/Rational%20Quality%20Manager#action=com.ibm.team.workitem.viewWorkItem&id=21416 , it is supported in RQM 4.0. I am using RQM 3.0.Please confirm. Thanks, Sanam Hello Sanam. In answer to your first question, you need to use forward slashes in the pathname to your report file, ie. echo myReport1=c:/Logs/InfoLog.html >> "%qm_AttachmentsFile%". Regarding your second question, this support is only available in RQM 4.0 and later.
Hi, I am facing similar problem on Windows XP, where I need to set URL of automation report to RQM execution result. The report URL is read from a file and stored in a variable. This is what I am doing,
FOR /f "delims=" %%a in (%logdir%\LAReportLink.txt) do set reportLink=%%a
echo AutomationReport="%reportLink%" >> "%qm_AttachmentsFile%"
And, this is what I see on the .out file on Execution Result
AutomationReport="http://xx.ibm.com/ResultsSummary.html >> "C:\Documents and Settings\Administrator\Local Settings\Temp\QMAdapter1410188893623044333.attach"
Please suggest what should be the correct syntax to attach URL from a variable value to %qm_AttachmentsFile%.
Thanks,
Preeti
Hi Preeti, if you are seeing this
Preeti Patil
commented Feb 26 '13, 12:50 p.m.
Hi Thomas, I tried without quotes still getting same line without quotes with replace value of %reportLink%.
AutomationReport=http://xx.ibm.com/ResultsSummary.html >> "C:\Documents and Settings\Administrator\Local Settings\Temp\QMAdapter1410188893623044333.attach"
Thanks,
Preeti
Preeti, that command looks correct. If you are seeing that in the stdout file attached to the execution result then somehow the redirection (ie. >>) is being escaped. If the line "AutomationReport=http://xx.ibm.com/ResultsSummary.html" gets placed in
showing 5 of 8
show 3 more comments
|
Hi @sanamchugh,
You need to get the full path of the file. For that you should try to get value of Environment variable "com.ibm.rqm.adapter.resultAttachmentsFile". Then you can open this file and provide details about the attachment. Let me know if this does solve your problem. -|- Pramod Chandoria |
Hi Pramod,
Thanks for your response. What I cant understand is how to get the value of the environment variable qm_attachmentsfile(this environment variable has the value of the java properties file) and how to update this file with the name and value pair?
Thanks,
Sanam
|
Hi, Does that apply for RFT Scripts too ?
I want to add custom attachment files to the result after my RFT is executed from RQM. I made some tests and it seems that the variable qm_AttachmentsFile is not available during the execution of the RFT script. I'm trying to retrieve it using the same I retrieve other Execution Variables passed to the script. Comments Currently I don't believe the RFT adapter supports this. The RQM adapter library does contain the required infrastructure, but the RFT adapter would have to be modified to make use of it. You could open an enhancement request for such support in a future release of the RFT adapter. One other thing to note, qm_AttachmentsFile is an environment variable, not an execution variable. RFT may implement something similar to what the command line adapter does using Execution Variables. You might suggest this in the enhancement request.
Leandro David
commented Jun 10 '13, 4:43 p.m.
Thanks Thomas
|
Hi all
!!PROBLEM SOLVED!! I've spent many hours looking at some posts about this issue but no answer at all. So I was trying to change the sintax on the .bat file and I realized how it works. Check the example below to attach links and files: ECHO IBMSite=http://www.ibm.com >> %qm_AttachmentsFile% ECHO GoogleSite=http://www.google.com >> %qm_AttachmentsFile% ECHO RXLog=C:\\TEMP\\automacao.rtf >> %qm_AttachmentsFile% I still have some doubts:
Please Help! |
If someone can help me with my query, it will be really appreciated..
Whatever has been discussed above worked great for me in a framework that just uses Selenium and Java. But the same line is not working for me in another framework that uses Maven. Is there some change that is required in maven?
Code from my bat file::
mvn test -DsuiteXmlFile=%1
ECHO ExecutionReport=C:/.../Report/RQM-Test-Report.html >> "%qm_AttachmentsFile%"
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.